str_01 = "hello"
# 确定异常类 IndexError KeyError  .....
try:
    # int(str_01)
    print(str_01[10])
except IndexError as e:
    print("IndexError", e)
except KeyError as e:
    print("KeyError", e)
except ValueError as e:
    print("ValueError", e)
# 通用异常类 Exception
try:
    int(str_01)
except Exception as e:
    print(e)
# try...except...else...finally...
try:
    list(str_01)
except Exception as e:
    print(e)
else:
    print("I'm gonna work if there is no exception")
finally:  # Usually it's used for clearing cache
    print("I'm gonna work whether there is an exception")
# Use raise assertion statement to throw exception actively
